(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
f(X) → if(X, c, n__f(true))
if(true, X, Y) → X
if(false, X, Y) → activate(Y)
f(X) → n__f(X)
activate(n__f(X)) → f(X)
activate(X) → X
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → if(z0, c, n__f(true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
activate(n__f(z0)) → f(z0)
activate(z0) → z0
Tuples:
F(z0) → c1(IF(z0, c, n__f(true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c5(F(z0))
S tuples:
F(z0) → c1(IF(z0, c, n__f(true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c5(F(z0))
K tuples:none
Defined Rule Symbols:
f, if, activate
Defined Pair Symbols:
F, IF, ACTIVATE
Compound Symbols:
c1, c4, c5
(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(false, z0, z1) → c4(ACTIVATE(z1))
We considered the (Usable) Rules:none
And the Tuples:
F(z0) → c1(IF(z0, c, n__f(true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c5(F(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ACTIVATE(x1)) = [2]x1
POL(F(x1)) = [2]x1
POL(IF(x1, x2, x3)) = [2]x1 + [4]x3
POL(c) = [2]
POL(c1(x1)) = x1
POL(c4(x1)) = x1
POL(c5(x1)) = x1
POL(false) = [3]
POL(n__f(x1)) = x1
POL(true) = 0
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → if(z0, c, n__f(true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
activate(n__f(z0)) → f(z0)
activate(z0) → z0
Tuples:
F(z0) → c1(IF(z0, c, n__f(true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c5(F(z0))
S tuples:
F(z0) → c1(IF(z0, c, n__f(true)))
ACTIVATE(n__f(z0)) → c5(F(z0))
K tuples:
IF(false, z0, z1) → c4(ACTIVATE(z1))
Defined Rule Symbols:
f, if, activate
Defined Pair Symbols:
F, IF, ACTIVATE
Compound Symbols:
c1, c4, c5
(5) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
ACTIVATE(n__f(z0)) → c5(F(z0))
F(z0) → c1(IF(z0, c, n__f(true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
Now S is empty
(6) BOUNDS(O(1), O(1))